#! /bin/ksh
# IBM_PROLOG_BEGIN_TAG 
# This is an automatically generated prolog. 
#  
#  
#  
# Licensed Materials - Property of IBM 
#  
# (C) COPYRIGHT International Business Machines Corp. 1999,2004 
# All Rights Reserved 
#  
# US Government Users Restricted Rights - Use, duplication or 
# disclosure restricted by GSA ADP Schedule Contract with IBM Corp. 
#  
# IBM_PROLOG_END_TAG 
#
#* CPRY
#
# @(#)83   1.3         src/rsct/pgs/cmds/hagsvote.sh, gsctrl, rsct_rzauh, rzauh0431a 2/28/02 17:43:31
#*======================================================================
#* Module Name:  hagsvote
#*======================================================================

basecmd="hagsvote"
basepath="/usr/sbin/rsct/bin"

SPMSG=${basepath}/hadspmsg
MSGMAPPATH=/usr/sbin/rsct/msgmaps
export MSGMAPPATH

# process the command lines
if [[ -z $1 ]]; then
   # no arguments
   $SPMSG hagsctrl ha_gs.cat IMsg_hagsvote_Usage $basecmd $basecmd $basecmd $basecmd
   exit
fi

args=""
c_opt=""
while getopts ":h:g:s:p:a:lc" opt; do
   case $opt in
	h | g | s | p | a )
                args="$args -${opt} $OPTARG"
                ;;
	l )
		args="$args -l"
		;;
        c )
                c_opt=1
                ;;
        * )
                #${basecmd}: Not a recognized flag: -${OPTARG}
                $SPMSG hagsctrl ha_gs.cat EMsg_Incorrect_Flag ${basecmd} ${OPTARG}
                $SPMSG hagsctrl ha_gs.cat IMsg_hagsvote_Usage $basecmd $basecmd $basecmd $basecmd
                exit 1
                ;;
    esac
done

shift $(($OPTIND - 1))


if [[ ! -z $c_opt ]]; then
	# canonical form
	exec ${basepath}/${basecmd}_c $args
else
	# locale dependent
	exec ${basepath}/${basecmd}_nls $args
fi



